﻿<?xml version="1.0" encoding="utf-8"?>
<cms:formdefinition xmlns="http://www.composite.net/ns/management/bindingforms/std.ui.controls.lib/1.0" xmlns:f="http://www.composite.net/ns/management/bindingforms/std.function.lib/1.0" xmlns:cms="http://www.composite.net/ns/management/bindingforms/1.0">
  <cms:bindings>
    <cms:binding name="FileDataFileName" type="System.String" />
    <cms:binding name="FileDataTitle" type="System.String" optional="true"/>
    <cms:binding name="FileDataDescription" type="System.String" optional="true"/>
    <cms:binding name="ProvidesMetaData" type="System.Boolean" />
  </cms:bindings>
  <cms:layout iconhandle="media-edit-media-file">
    <FieldGroup Label="${Composite.Management, Website.Forms.Administrative.EditMediaFile.LabelFieldGroup}">
      <TextBox Label="${Composite.Management, Website.Forms.Administrative.EditMediaFile.LabelFileName}" Help="${Composite.Management, Website.Forms.Administrative.EditMediaFile.HelpFileName}" SpellCheck="false">
        <TextBox.Text>
          <cms:bind source="FileDataFileName" />
        </TextBox.Text>
      </TextBox>
      <f:BooleanCheck>
        <f:BooleanCheck.CheckValue>
          <cms:read source="ProvidesMetaData" />
        </f:BooleanCheck.CheckValue>
        <f:BooleanCheck.WhenTrue>
          <TextBox Label="${Composite.Management, Website.Forms.Administrative.EditMediaFile.LabelTitle}" Help="${Composite.Management, Website.Forms.Administrative.EditMediaFile.HelpTitle}">
            <TextBox.Text>
              <cms:bind source="FileDataTitle" />
            </TextBox.Text>
          </TextBox>
        </f:BooleanCheck.WhenTrue>
      </f:BooleanCheck>
      <f:BooleanCheck>
        <f:BooleanCheck.CheckValue>
          <cms:read source="ProvidesMetaData" />
        </f:BooleanCheck.CheckValue>
        <f:BooleanCheck.WhenTrue>          
          <TextArea Label="${Composite.Management, Website.Forms.Administrative.EditMediaFile.LabelDescription}" Help="${Composite.Management, Website.Forms.Administrative.EditMediaFile.HelpDescription}">            
              <cms:bind source="FileDataDescription" />            
          </TextArea>
        </f:BooleanCheck.WhenTrue>
      </f:BooleanCheck>
    </FieldGroup>
  </cms:layout>
</cms:formdefinition>